const { remote } = window.require('electron')

export default {
    install (Vue) {
        Vue.mixin({
            beforeCreate () {
                this.$sharedObject = function (key) {
                  let sharedObject = remote.getGlobal('sharedObject')
                  return key !== undefined ? sharedObject[key] : sharedObject
                }
            }
        })
    }
}
